#include <cstdio>
#include <cmath>

int get_divisor_num(int x);

int main(int argc, char const *argv[]){
    int n;
    while (scanf("%d", &n) != EOF){
        if (n == 0)
            break;
        for (int i = 0; i < n; i++){
            int num;
            scanf("%d", &num);
            printf("%d\n", get_divisor_num(num));
        }
    }
    return 0;
}

int get_divisor_num(int x){
    int divisor_num = 0;
    int bound = (int)sqrt(x);
    for (int i = 1; i <= bound; i++){
        if (x % i == 0){
            if (i*i == x)
                divisor_num++;
            else
                divisor_num += 2;
        }
    }
    
    return divisor_num;
}
